import React from 'react'
import Son1 from './Son1'
class Fath extends React.Component{
    ifPage(id){
        console.log(id)
        if(id){
            console.log(id)
            return <Son1 id={id}></Son1>
        }else{
            console.log(id)
            return <Son1></Son1>
        }
    }
    render(){
     console.log(this.props.match.params.id)   
        return(
            <div>
                父类123456
                {this.ifPage(this.props.match.params.id)}
            </div>
        )
    }
}
export default Fath


